<template>
    <div class="drop">
        <el-dropdown @command="handleCommond" trigger="click">
            <div class="avatar">
                <!-- <img :src="avatar" alt="avatar" /> -->
                <el-avatar :src="avatar" alt="avatar" shape="circle"></el-avatar>
            </div>
                <!-- <span>
                  <el-button type="primary">更多
                    <el-icon size="20" color="#fff">
                      <i-ep-ArrowDown />
                    </el-icon>
                  </el-button>
                </span> -->
                <template #dropdown>
                  <el-dropdown-menu>
                    <el-dropdown-item command="logout">退出</el-dropdown-item>
                    <el-dropdown-item command="store">我的仓库</el-dropdown-item>
                  </el-dropdown-menu>
                </template>
              </el-dropdown>
    </div>
</template>
<script setup>
import avatar from '@/assets/images/avatar.gif'
import { openUrl, deepClone } from '@/utils/publicMethods'
const handleCommond = (command) => {
  switch (command) {
    case 'logout': 
       console.log('退出');
       break;
    case 'store': 
       openUrl('https://gitee.com/lucky-zhaofang')
       break;
  }
}

const obj = {
  name: '听风',
  age: 29,
  other: {
    gender: 'male',
    arr: [1, 2, 3]
  }
};
console.log(deepClone(obj))
</script>